<template>
  <div class="details">
    <div class="title fc">
      <h2>{{list.title}}</h2>
    </div>
    <div class="bianqian fc">
      <ul class="fc">
        <li>
          编辑时间： {{list.add_time}}
        </li>
        <li>
          浏览量: 315
        </li>
        <li>
          作者: 段亮
        </li>
      </ul>
    </div>


    <div class="content">
      <mavon-editor :value="list.content"  :toolbarsFlag="false" defaultOpen="preview" :subfield="false"/>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      list: ''
    }
  },
  created() {
    this.$axios.$get(`/api/web/article/${this.$route.params.id}`).then((con) => {
      this.list = con.data[0]
    })
  }
}
</script>

<style lang="less" scoped>
.details {
  margin: 10px;
  background-color: #fff;
  padding: 20px 0;
  .content{
    margin-top: 30px;
  }
}
</style>
